using UnityEngine;
using System.Collections;

public class SpawnUnitMes : Message
{
	public UnitID type;
	public Vector3 pos;
	public SpawnUnitMes(){}
	public SpawnUnitMes(string buffer)
	{
		messageBuffer = buffer;
		unPack();
	}
	public override void unPack ()
	{
		//S#TYPE#XPOS#YPOS#
		string[] mes = messageBuffer.Split('#');
		type = (UnitID)int.Parse(mes[0]);
		pos.x = float.Parse(mes[1]);
		pos.y = float.Parse(mes[2]);
	}
}
